﻿using System.Diagnostics;
using System.Xml.Serialization;

namespace SilverCrmSoap.FetchXml
{
    
    [DebuggerStepThrough]
    [XmlType(AnonymousType = true)]
    [XmlRoot(Namespace = "", IsNullable = false)]
    public class LinkEntity : Entity
    {
        public LinkEntity()
        {
            
        }

        public LinkEntity(string name, string from, string to, string alias, Filter filter)
        {
            Name = name;
            From = from;
            To = to;
            Alias = alias;
            Filter = filter;
        }

        [XmlAttribute("to")]
        public string To { get; set; }
        
        [XmlAttribute("from")]
        public string From { get; set; }

        [XmlAttribute("alias")]
        public string Alias { get; set; }

        [XmlAttribute("link-type")]
        public string LinkType { get; set; }

        [XmlAttribute("visible")]
        public bool Visible { get; set; }

        [XmlIgnore]
        public bool VisibleSpecified { get; set; }

        [XmlAttribute("intersect")]
        public bool Intersect { get; set; }

        [XmlIgnore]
        public bool IntersectSpecified { get; set; }
    }
}